import React, { Component } from 'react'
import './App.less';
import {
    Switch,
    Route
} from 'react-router-dom'
import Frame from './Components/Frame';
import SprayList from './Views/SprayList';
import About from './Views/About';
import Home from './Views/Home';
import NotFound from './Components/NotFound';
import ConcreteArticle from './Views/ConcreteArticle';
import Cates from './Views/Cates';
import zhCN from 'antd/lib/locale/zh_CN';
import { ConfigProvider } from 'antd';

export default class App extends Component {
    render() {
        return (
            <ConfigProvider locale={zhCN}>
                <div>
                    <Frame>
                        <Switch>
                            <Route path='/article/:id' component={ConcreteArticle} />

                            <Route path='/' exact={true} component={Home} />

                            <Route path='/cate/:cateID' component={Cates} />

                            <Route path='/spray' component={SprayList} />

                            <Route path='/about' component={About} />

                            <Route component={NotFound} />
                        </Switch>
                    </Frame>
                </div>
            </ConfigProvider >
        )
    }
}
